package com.dongdongshop.service.imp;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.TbUserScoreAccountMapper;
import com.dongdongshop.pojo.TbUserScoreAccount;
import com.dongdongshop.service.ScoreAccountService;

import javax.annotation.Resource;

@Service
@org.springframework.stereotype.Service
public class ScoreAccountServiceImpl implements ScoreAccountService {
    @Resource
    private TbUserScoreAccountMapper tbUserScoreAccountMapper;

    @Override
    public TbUserScoreAccount getByUserId(String userId) {
        return tbUserScoreAccountMapper.getByUserId(userId);
    }

    @Override
    public void addinfo(TbUserScoreAccount scoreAccount) {
        tbUserScoreAccountMapper.insertSelective(scoreAccount);
    }

    @Override
    public void updateinfo(TbUserScoreAccount tbUserScoreAccount) {
        tbUserScoreAccountMapper.updateByPrimaryKeySelective(tbUserScoreAccount);
    }

}
